<!DOCTYPE html>
<html lang="en" class="app">

<head>
  <meta charset="utf-8" />
  <title>Notebook | Web Application</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"
  />

  <link rel="stylesheet" href="/css/bootstrap.css" type="text/css"
  />
  <link rel="stylesheet" href="/css/font-awesome.min.css" type="text/css"
  />
  <link rel="stylesheet" href="/plugins/parsleyjs/parsley.css"
    type="text/css" />
  <link rel="stylesheet" href="/less/app.css" type="text/css" />
  <!--[if lt IE 9]>
    <script src="/plugins/ie/html5shiv.js"></script>
    <script src="/plugins/ie/respond.min.js"></script>
    <script src="/plugins/ie/excanvas.js"></script>
  <![endif]-->
</head>

<body>
  <section class="vbox">
    <!-- header -->
    <header class="bg-dark dk header navbar navbar-fixed-top-xs">
      <div class="navbar-header aside-md">
        <a class="btn btn-link visible-xs" data-toggle="class:nav-off-screen,open"
          data-target="#nav,html">
          <i class="fa fa-bars"></i>
        </a>
        <a href="#" class="navbar-brand" data-toggle="fullscreen">
          <img src="images/logo.png" class="m-r-sm">Notebook</a>
        <a class="btn btn-link visible-xs" data-toggle="dropdown" data-target=".nav-user">
          <i class="fa fa-cog"></i>
        </a>
      </div>
      <ul class="nav navbar-nav navbar-right m-n hidden-xs nav-user">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <span class="thumb-sm avatar pull-left">
              <img src="images/avatar.jpg">
            </span>
            John.Smith
            <b class="caret"></b>
          </a>
          <ul class="dropdown-menu animated fadeInRight">
            <span class="arrow top"></span>
            <li>
              <a href="#">Settings</a>
            </li>
            <li>
              <a href="profile.html">Profile</a>
            </li>
            <li>
              <a href="#">
                <span class="badge bg-danger pull-right">3</span>
                Notifications
              </a>
            </li>
            <li>
              <a href="docs.html">Help</a>
            </li>
            <li class="divider"></li>
            <li>
              <a href="modal.lockme.html" data-toggle="ajaxModal">Logout</a>
            </li>
          </ul>
        </li>
      </ul>
    </header>

    <!-- section -->
    <section>
      <section class="hbox stretch">
        <!-- left -->
        <aside class="bg-dark lter aside-md hidden-print" id="nav">
          <section class="vbox">
            <section class="w-f scrollable">
              <div class="slim-scroll" data-height="auto" data-disable-fade-out="true"
                data-distance="0" data-size="5px" data-color="#333333">
                <nav class="nav-primary hidden-xs">
                  <ul class="nav">
                    <li name="salers">
                      <a href="javascript:;">
                        <i class="fa fa-columns icon">
                          <b class="bg-warning"></b>
                        </i>
                        <span class="pull-right">
                          <i class="fa fa-angle-down text"></i>
                          <i class="fa fa-angle-up text-active"></i>
                        </span>
                        <span>商家</span>
                      </a>
                      <ul class="nav lt">
                        <li>
                          <a href="salers.html">
                            <i class="fa fa-angle-right"></i>
                            <span>商家管理</span>
                          </a>
                        </li>
                        <li>
                          <a href="redBagManage.html">
                            <i class="fa fa-angle-right"></i>
                            <span>红包管理</span>
                          </a>
                        </li>
                        <li>
                          <a href="djq.html">
                            <i class="fa fa-angle-right"></i>
                            <span>代金券管理</span>
                          </a>
                        </li>
                      </ul>
                    </li>
                    <li name="order">
                      <a href="order.html">
                        <i class="fa fa-pencil icon">
                          <b class="bg-info"></b>
                        </i>
                        <span>订单管理</span>
                      </a>
                    </li>
                    <li name="identify">
                      <a href="identify.html">
                        <i class="fa fa-pencil icon">
                          <b class="bg-info"></b>
                        </i>
                        <span>认证信息</span>
                      </a>
                    </li>
                    <li name="balance">
                      <a href="balance.html">
                        <i class="fa fa-pencil icon">
                          <b class="bg-primary"></b>
                        </i>
                        <span>余额管理</span>
                      </a>
                    </li>
                  </ul>
                </nav>
              </div>
            </section>

            <!-- 缩小到侧边栏 -->
            <footer class="footer lt hidden-xs b-t b-dark">
              <a href="#nav" data-toggle="class:nav-xs" class="pull-right btn btn-sm btn-dark btn-icon">
                <i class="fa fa-angle-left text"></i>
                <i class="fa fa-angle-right text-active"></i>
              </a>
            </footer>
          </section>
        </aside>
        <!-- left -->

        <section class="vbox">
          <section class="scrollable padder">
            <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
              <li>
                <i class="fa fa-home"></i>首页
              </li>
              <li>
                <a href="salers.html">商家管理</a>
              </li>
              <li>红包管理</li>
            </ul>
            <section class="panel panel-default">
              <header class="panel-heading bg-light">
                <h3 class="m-t-none">公司名称</h3>
                <section class="panel panel-default">
                  <div class="row m-l-none m-r-none bg-light">
                    <div class="col-sm-8 text-center" style="padding:0;">
                      <div class="col-sm-4 padder-v b-r b-light">
                        <a class="clear" href="#">
                          <span class="h4 block">发出金额</span>
                          <span class="h2 block m-t-xs text-danger">
                            <strong>52,000</strong>
                          </span>
                          <small class="text-muted text-uc">元</small>
                        </a>
                      </div>
                      <div class="col-sm-4 padder-v b-r b-light">
                        <a class="clear" href="#">
                          <span class="h4 block">发出代金券</span>
                          <span class="h2 block m-t-xs text-danger">
                            <strong>52,000</strong>
                          </span>
                          <small class="text-muted text-uc">个</small>
                        </a>
                      </div>
                      <div class="col-sm-4 padder-v b-r b-light">
                        <a class="clear" href="#">
                          <span class="h4 block">发出精灵豆</span>
                          <span class="h2 block m-t-xs text-danger">
                            <strong>52,000</strong>
                          </span>
                          <small class="text-muted text-uc">个</small>
                        </a>
                      </div>
                    </div>
                    <div class="col-sm-4" style="flex-direction:column;display:flex;height:105px;justify-content:space-around;">
                      <a href="javascript:;" class="btn btn-sm btn-danger btn-rounded"
                        data-api="authenticateRedBag.html?outer=cashDispatch&tp=check"
                        data-type="2" data-outwidth='["900px","875px"]'
                        data-modal="bagCollectedDetail" data-json='{"userId":11}'>发布红包</a>
                      <!-- <a href="#" class="btn btn-sm btn-primary btn-rounded block">批量发布红包</a> -->
                      <a href="djq.html" class="btn btn-sm btn-info btn-rounded">代金券管理</a>
                    </div>
                  </div>
                </section>
                <form class="form-inline queryForm gcForm" id="redBagManageForm"
                  action="redBagManage.html" name="redBagManageForm"
                  method="post">
                  <input type="hidden" id="currentPage" name="page">
                  <input type="hidden" name="userId" value="$!userId">
                  <input type="hidden" id="status" name="status" value="$status">
                  <input type="hidden" id="date11" name="date11" value="$date11">
                  <input type="hidden" id="date22" name="date22" value="$date22">
                  <div class="form-group">
                    <input type="text" class="form-control m-r-md" name="queryCriteria"
                      value="$!queryCriteria" placeholder="输入用户名或账号">
                    <label for="apply_start_date">起止日期：</label>
                    <input type="date" value="" id="apply_start_date" class="form-control"
                      name="apply_start_date" readonly/>
                    <label for="apply_end_date">-</label>
                    <input type="date" value="" id="apply_end_date" class="form-control"
                      name="apply_end_date" readonly/>
                  </div>
                  <button type="submit" class="btn btn-success m-l-md">查询</button>
                  <span class="btn btn-sm btn-rounded btn-primary pull-right m-l-md"
                    onclick="">导出</span>
                </form>
              </header>
              <div class="panel-body">
                <section class="panel panel-default">
                  <header class="panel-heading bg-light">
                    <ul class="nav nav-tabs nav-justified">
                      <li>
                        <a href="javascript:void(0)" class="djq" data-toggle="tab" onclick="tabClick(0,event);">代金券红包</a>
                      </li>
                      <li>
                        <a href="javascript:void(0)" class="xj" data-toggle="tab" onclick="tabClick(1,event);">现金红包</a>
                      </li>
                      <li>
                        <a href="javascript:void(0)" class="jld" data-toggle="tab" onclick="tabClick(2,event);">精灵豆红包</a>
                      </li>
                    </ul>
                  </header>
                  <div>
                    <div class="tab-content">
                      <div class="tab-pane active">
                        <div data-gctable>
                          <div>
                            <table>
                              <thead>
                                <tr>
                                  <th width="30%">紅包地址</th>
                                  <th width="10%">发放时间</th>
                                  <th width="13%">总个数</th>
                                  <th width="8%">状态</th>
                                  <th>操作</th>
                                </tr>
                              </thead>
                            </table>
                          </div>
                          <div class="gcBody">
                            <table>
                              <tbody class="gcData">
                                <tr class="bg-white" data-id="">
                                  <td width="30%">多个地方的郭德纲的</td>
                                  <td width="10%">2017-02-02</td>
                                  <td width="13%">2222222</td>
                                  <td width="8%">发放中</td>
                                  <td>
                                    <div class="btn-group">
                                      <button type="button" data-id="111" data-type="2" data-api="redBagDetailed.html?outer=redbagdetail&tp=check"
                                        data-modal="bagCollectedDetail"
                                        data-outwidth="850px" class="btn btn-sm btn-primary"
                                        data-query=".queryForm"
                                        data-json='{"arRedId":111}'>查看领取详情</button>
                                      <!-- <button type="button" data-id="111" class="btn btn-sm btn-danger stopRedBag">暂停红包</button> -->
                                      <button type="button" data-id="111" class="btn btn-sm btn-danger"
                                        data-type="2" data-api="redbag/cash?outer=cashDispatch&tp=check"
                                        data-outwidth="800px" data-modal="redDetail"
                                        data-json='{"redType":21,"address":"文本地址","longitude":"经度","latitude":"纬度","ReceiveRequire":1,"receiveRange":"可领取范围","voucher":"满11减10","redNum":"代金券总张数","xct":"images/app.png","redURL":"宣传链接","remark":"说明"}'>查看红包信息</button>
                                    </div>
                                  </td>
                                </tr>
                                <!-- 无数据时 -->
                                <tr class="bg-white">
                                  <td colspan="5">暂无数据</td>
                                </tr>
                              </tbody>
                            </table>
                          </div>
                          <p class="gcPage">
                            #set ($formName = "salesForm") #parse('/html/page.html')
                          </p>
                        </div>
                      </div>
                    </div>
                  </div>
                </section>
              </div>
            </section>
          </section>
        </section>
      </section>
    </section>
  </section>

  <!-- 1 发布红包 -->
  <div class="chooseRedBagType" style="display:none;">
    <section class="panel panel-default m-b-none">
      <div class="row m-l-none m-r-none bg-light text-center">
        <div class="col-sm-4 padder-v b-r b-light">
          <div data-type="2" data-id="0" data-api="redbag?outer=cashDispatch&tp=add"
            data-outwidth="800px" data-modal="redbags" data-json='{"firstTitle":"红包总金额","firstPlace":"必填，需大于0.1","secondTitle":"总人数","secondPlace":"必填，总金额/总人数需大于等于0.1"}'>
            <a class="clear" href="#">
              <span class="fa-stack fa-4x">
                <i class="fa fa-circle fa-stack-2x text-danger"></i>
                <i class="fa fa-money fa-stack-1x text-white"></i>
              </span>
              <span class="h4 block m-t-sm">现金红包</span>
            </a>
          </div>
        </div>
        <div class="col-sm-4 padder-v b-r b-light">
          <div data-type="2" data-id="0" data-api="redbag?outer=cashDispatch&tp=add"
            data-outwidth="800px" data-modal="redbags" data-json='{"firstTitle":"代金券总张数","firstPlace":"必填，整数，需大于1","hidden":"none","visibility":"block"}'>
            <a class="clear" href="#">
              <span class="fa-stack fa-4x">
                <i class="fa fa-circle fa-stack-2x text-success"></i>
                <i class="fa fa-ticket fa-stack-1x text-white"></i>
              </span>
              <span class="h4 block m-t-sm">代金券红包</span>
            </a>
          </div>
        </div>
        <div class="col-sm-4 padder-v b-r b-light">
          <div data-type="2" data-id="0" data-api="redbag?outer=cashDispatch&tp=add"
            data-outwidth="800px" data-modal="redbags" data-json='{"firstTitle":"精灵豆总个数","firstPlace":"必填，整数，需大于1","secondTitle":"总人数","secondPlace":"必填，总人数需小于等于精灵豆总个数"}'>
            <a class="clear" href="#">
              <span class="fa-stack fa-4x">
                <i class="fa fa-circle fa-stack-2x text-info"></i>
                <i class="fa fa-bitcoin fa-stack-1x text-white"></i>
              </span>
              <span class="h4 block m-t-sm">精灵豆红包</span>
            </a>
          </div>
        </div>
      </div>
    </section>
  </div>

  <script src="/js/jquery.min.js"></script>
  <!-- Bootstrap -->
  <script src="/js/bootstrap.js"></script>
  <!-- App -->
  <script src="/js/app.js"></script>
  <!--引入layer-->
  <script src="/plugins/layer/layer.js"></script>
  <script src="/plugins/parsleyjs/parsley.min.js"></script>
  <script src="/plugins/parsleyjs/i18n/zh_cn.js"></script>
  <script src="/plugins/laydate/laydate.js"></script>

  <script src="/templates/index.js"></script>
  <script src="/plugins/common.js"></script>
  <script>
    $(function () {
      // 查询日期设置
      setDateRange();
    });

    var type = 1;
    switch (type) {
      //
      case 0:
        switchClass('djq');
        break;
      case 1:
        switchClass('xj');
        break;
      case 2:
        switchClass('jld');
        break;
    }

    function switchClass(n) {
      $('.' + n).parent().addClass('active').siblings().removeClass('active');
    }

    // 点击tab
    function tabClick(n, e) {
      if (e.target.parentElement.className !== 'active') {
        $('#status').val(n);
        $('#currentPage').val(1);
        $('#identifyForm').submit();
      }
    }
  </script>
</body>

</html>